package czy.demo.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {

    private static final Logger logger = LoggerFactory.getLogger(HelloController.class);

    @GetMapping()
    public String hello(){return "Hello World!";};

    @GetMapping("/say")
    public String sayHello(){
        return "Hello";
    }

    @GetMapping("/timeout")
    public String timeout()throws InterruptedException{
        Thread.sleep(5000);
        return "连接超时";
    }

}
